<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=375">
    <title>移动端的缩放</title>
    <style>
        ul{
            list-style:none;
            overflow: hidden;
        }
        li{
            width: 60px;
            float:left;
            margin-right: 10px;
        }
        #result {
            width: 100%;height: 200px;border:solid 1px #ddd;
        }
    </style>
</head>
<body>
    <ul>
        <li><img width="100%" src="./images/liudehua.jpg" alt=""></li>
        <li><img width="100%" src="./images/guofucheng.jpg" alt=""></li>
        <li><img width="100%" src="./images/liming.jpg" alt=""></li>
        <li><img width="100%" src="./images/zhangxueyou.jpg" alt=""></li>
    </ul>

    <div id="result"></div>

    <script>
        //获取元素
        let result = document.querySelector("#result");

        setInterval(() => {
            //设置文本
            result.innerHTML = `
                当前布局视口的宽度: ${document.documentElement.clientWidth}<br/>
                当前视觉视口的宽度: ${window.visualViewport.width}
            `
        }, 300)

    </script>
</body>
</html>